<template>
  <view class="userLayout pageBg">
    <div class="userInfo">
      <div class="user-logo">
        <image src="/static/xxmLogo.png" mode="aspectFill"></image>
      </div>
      <div class="ip">100.100.100.100</div>
      <div class="address">来自于：山东</div>
      
    </div>
    <!-- 客服跳转 -->
    <div class="section">
        <div class="list">
          <!-- 我的下载 -->
          <navigator url="/pages/classList/classList">
            <div class="row">
            <div class="left">
              <uni-icons type="download-filled" size="20" color="$brand-theme-color"></uni-icons>
              <div class="text">我的下载</div>
            </div>
            <div class="right">
              <div class="text">33</div>
              <uni-icons type="right" size="15" color="#aaa"></uni-icons>
            </div>
          </div>
          </navigator>
          
          <!-- 我的评分 -->
          <navigator url="/pages/classList/classList">
            <div class="row">
            <div class="left">
              <uni-icons type="star-filled" size="20" color="$brand-theme-color"></uni-icons>
              <div class="text">我的评分</div>
            </div>
            <div class="right">
              <div class="text">103</div>
              <uni-icons type="right" size="15" color="#aaa"></uni-icons>
            </div>
          </div>
          </navigator>
          
          <!-- 联系客服 -->
          <div class="row">
            <div class="left">
              <uni-icons type="phone-filled" size="20" color="$brand-theme-color"></uni-icons>
              <div class="text">联系客服</div>
            </div>
            <div class="right">
              <uni-icons type="right" size="15" color="#aaa"></uni-icons>
            </div>
            <!-- #ifdef MP -->
            <button class="kefu" open-type="contact">联系客服</button>
            <!-- #endif -->
            <!-- #ifdef H5 -->
            <button @click="callPhone">拨打电话</button>
            <!-- #endif -->
          </div>
        </div>
      </div>
      <div class="section">
        <div class="list">
          <!-- 订阅更新 -->
          <div class="row">
            <div class="left">
              <uni-icons type="notification-filled" size="20" color="$brand-theme-color"></uni-icons>
              <div class="text">订阅更新</div>
            </div>
            <div class="right">
              <uni-icons type="right" size="15" color="#aaa"></uni-icons>
            </div>
          </div>
        <!-- 常见问题 -->
        <div class="row">
            <div class="left">
              <uni-icons type="more-filled" size="20" color="$brand-theme-color"></uni-icons>
              <div class="text">常见问题</div>
            </div>
            <div class="right">
              <uni-icons type="right" size="15" color="#aaa"></uni-icons>
            </div>
          </div>
        </div> 
      </div>
  </view>
</template>

<script setup>
  const callPhone=()=>{
      uni.makePhoneCall({
        phoneNumber:1111
    })
  }
  
</script>

<style lang="scss" scoped>
.userLayout{
  .userInfo{
   display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 52rpx 0;
    .user-logo{
      width: 160rpx;
      height: 160rpx;
      border-radius: 50%;
      overflow: hidden;
      image{
        width: 100%;
        height: 100%;
      }  
    }
    .ip{
        font-size: 44rpx;
        color: #333;
        padding: 20rpx 0 5rpx;
      }
      .address{
        color: #aaa;
        font-size: 28rpx;
      }
  }
  .section{
    width: 690rpx;
    margin: 50rpx auto;
    border: 1rpx solid #eee;
    border-radius: 10rpx;
    box-shadow: 0 0 30rpx rgba(0, 0, 0, .05);
    .list{
      .row{
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 30rpx;
        height: 100rpx;
        border: 1rpx solid #eee;
        position: relative;
        background: #fff;
        &:last-child{
          border-bottom: 0;
        }
        .left{
          display: flex;
          justify-content: center;
          align-items: center;
          .text{
            padding-left: 20rpx;
            color: #666;
          }
        }
        .right{
          display: flex;
          justify-content: center;
          align-items: center;
          .text{
            font-size: 28rpx;
            color: #aaa;
          }
        }
        button{
          position: absolute;
          top: 0%;
          left: 0;
          height: 100rpx;
          width: 100%;
          opacity: 0;
        }
      }
    }
  }
}
</style>
